package com.xebia.pomodoro.printer
{
	import com.xebia.pomodoro.enums.P2PMessageType;
	import com.xebia.pomodoro.messages.P2PMessage;
	import com.xebia.pomodoro.model.P2PModel;

	import mx.collections.ArrayCollection;

	public class PrinterUtil
	{
		public function PrinterUtil()
		{
		}

		public static const list:ArrayCollection = new ArrayCollection([ P2PMessageType.CHAT, P2PMessageType.REGISTERATION, P2PMessageType.WELCOME ]);

		public static function writeText(message:P2PMessage):void
		{
			if (list.contains(message.type))
			{
				P2PModel.messageText += message.toString() + "\n";
			}
		}
	}
}
